<template>
<div>
  <IndexHeader></IndexHeader>
  <WxPay :orderInfo="orderInfo" v-if="payStatus==1"></WxPay>
  <WxPaySuccess :orderInfo="orderInfo" v-if="payStatus==2"></WxPaySuccess>
</div>
</template>

<script>
import WxPay from "@/components/pay/WxPay";
import IndexHeader from "@/components/index/IndexHeader";
import WxPaySuccess from "@/components/pay/WxPaySuccess";
export default {
  name: "Pay",
  components:{
    WxPaySuccess,
    IndexHeader,
    WxPay
  },
  data(){
    return{
      orderInfo:{},
      payStatus:1,
    }
  },
  created() {
    this.orderInfo=JSON.parse(this.$route.query.orderInfo);
    this.payStatus=this.$route.query.payStatus;
  }
}
</script>

<style scoped>

</style>